From 75de50cfa4848f39d6dbd0d9ed120207b3d5a0cf Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 16 Aug 2009 12:22:32 +0000 Subject: [PATCH] * dbusbind.c (xd_initialize): Add connection file descriptor to input_wait_mask, in order to let select() detect, whether a new message has been arrived. --- src/dbusbind.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dbusbind.c b/src/dbusbind.c index aa4efa7ca33..cde4dba3a23 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -696,6 +696,7 @@ xd_initialize (bus) { DBusConnection *connection; DBusError derror; + int fd; /* Parameter check. */ CHECK_SYMBOL (bus); @@ -716,6 +717,11 @@ xd_initialize (bus) if (connection == NULL) XD_SIGNAL2 (build_string ("No connection"), bus); + /* Add connection file descriptor to input_wait_mask, in order to + let select() detect, whether a new message has been arrived. */ + if (dbus_connection_get_unix_fd (connection, &fd)) + add_keyboard_wait_descriptor (fd); + /* Cleanup. */ dbus_error_free (&derror); -- 2.30.2